/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.4.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          2e-3;

writeControl    runTime;

writeInterval   0.01;

purgeWrite      1;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  true;

maxCo           2.0;

functions
{
    forceCoeffs
    {
        type                forceCoeffs;
        functionObjectLibs  ("libforces.so");
        outputControl       timeStep;
        outputInterval      1;

        patches             ("airfoil.*");
        pName               p;
        UName               U;
        rhoName             rhoInf;
        log                 true;

        liftDir             (0 0 1);
        dragDir             (1 0 0);
        CofR                (0 0 0);
        pitchAxis           (0 1 0);

        magUInf             1.0;
        rhoInf              1000;
        lRef                1;
        Aref                1;
    }

    fieldAverage
    {
        type            fieldAverage;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        timeStart       10;
        outputControl   outputTime;
        resetOnRestart  true;
        resetOnOutput   false;

        fields
        (
            nut
            {
                mean        on;
                prime2Mean  off;
                base        time;
            }

            k
            {
                mean        on;
                prime2Mean  off;
                base        time;
            }

            omega
            {
                mean        on;
                prime2Mean  off;
                base        time;
            }
        );
    }
}


// ************************************************************************* //
